<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="C" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>

<HTML><HEAD><TITLE>后台操作区</TITLE>
<LINK href="../../../static/css/member/Admin_Style.css" type=text/css rel=stylesheet>
<LINK href="../../../static/css/member/style.css" type=text/css rel=stylesheet>
<SCRIPT language=JavaScript src="../../../static/js/member/Common.js"></SCRIPT>
<STYLE type=text/css>
BODY {
	MARGIN-LEFT: 0px; BACKGROUND-COLOR: #ffffff
}
.STYLE1 {color: #ECE9D8}
</STYLE>
</HEAD>
<script type="text/javascript">
function checkUser33()
{
	if(document.form1.username.value=="")
	{
		alert("请输入登录名！ ");
		document.form1.username.focus();
		return false;
	}
	if(document.form1.password.value=="")
	{
		alert(" 请输入登陆密码！");
		document.form1.password.focus();
		return false;
	}
}
function getMsg() {
	var res=document.getElementById("msg").value;
	if(res=="修改成功！"){
		alert("修改成功！");
	}else if(res=="修改失败！"){
		alert("修改失败！");
	}else if(res=="新增成功！"){
		alert("新增成功！");
	}else if(res=="新增失败！"){
		alert("新增失败！");
	}else if(res=="删除成功！"){
		alert("删除成功！");
	}else if(res=="删除失败！"){
		alert("删除失败！");
	}
}
</script>
<BODY onload="getMsg()" oncontextmenu="return false;" onselectstart="return false;" leftMargin=0 background=../../../static/images/member/MainBg.gif topMargin=0 scroll=no marginheight="0" marginwidth="0">
<input type="hidden" value="${msg}" id="msg">
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD align="left" vAlign=top >
	<form action="/admin/update" method="post" name="form1" onSubmit="return checkUser33()">
       <TABLE width="100%" border=0 align="center" cellPadding=3 cellSpacing=1 class=tablewidth>
		  <TBODY>
		  <TR align="center" class=head>
			<TD height=23>序号</TD>
			<TD>管理员名</TD>
			<TD>创建时间</TD>
			<TD>登录次数</TD>
			<TD>删除</TD>
		  </TR>
			<c:choose>
				<c:when test="${adminAll!=null}">
					<c:forEach items="${adminAll}" var="admin">
		  <TR align="center" bgColor=#ffffff>
			<TD width="30" id=map>${admin.id}</TD>
			<TD id=map>${admin.username}</TD>
			<TD id=map><fmt:formatDate value="${admin.creattime}" pattern="yyyy-mm-dd hh:mm:ss"/></TD>
			<TD id=map>${admin.logintimes}</TD>
			<TD id=map><a href="/admin/del?id=${admin.id}">删除</a></TD>
		  </TR>
					</c:forEach>
				</c:when>
				<c:otherwise>
		  <TR align="center" bgColor=#ffffff>
			<TD colspan=8 align=center id=map>当前还没有添加管理员</TD>
		  </TR>
				</c:otherwise>
			</c:choose>
		  </TBODY>
	   </TABLE><br>
	   <TABLE width="40%" border=0 align="center" cellPadding=3 cellSpacing=1>
	   <TR><TD>
	   <TABLE width="100%" border=0 align="center" cellPadding=3 cellSpacing=1 class=tablewidth>
		  <TBODY>
		  <TR align="center" class=head>
			<TD height=23 colspan="2">增加/修改管理员</TD>
		  </TR>
		  <TR  align="center" bgColor=#ffffff>
			<TD width="40%" align="right" id=map>管理员名：</TD>
			<TD width="60%" align="left" id=map><input type="text" name="username" maxlength="10" size="18" class=input  onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
                              onkeyup="value=value.replace(/[\W]/g,'')"/>&nbsp;字母或数字6-10位</TD>
		  </TR>
		  <TR align="center" bgColor=#ffffff>
			<TD align="right" id=map>登录密码：</TD>
			<TD align="left" id=map><input type="password" name="password" maxlength="16" size="18" class=input  onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" 
                              onkeyup="value=value.replace(/[\W]/g,'')"/>&nbsp;字母或数字6-16位</TD>
		  </TR>
		  
		  <TR align="center" bgColor=#ffffff>
			<TD colspan="2" align="center" id=map><input type="submit" value="确定">&nbsp;&nbsp;<input type="reset" value="重填"></TD>
			</TR>
		  </TBODY>
	   </TABLE>
	   </TD></TR></table><br>
	   
	  </form>
    </TD>
  </TR>
  </TBODY>
</TABLE>
</BODY>
</HTML>
